package dwl.graduation.design.domain;

public enum ProcessEnum {
    NEW("新增",(short)0),
    Fixing("报修",(short)1),
    Scrap("报废",(short)3),
    Transfer("转移",(short)4);

    private String name;
    private Short index;

    private ProcessEnum(String name, Short index){
        this.name = name;
        this.index = index;
    }

    public static String getName(Short index){
        for(ProcessEnum s: ProcessEnum.values()){
            if(s.getIndex().equals(index)){
                return s.name;
            }
        }
        return null;
    }

    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public Short getIndex() {
        return index;
    }
    public void setIndex(Short index) {
        this.index = index;
    }
}
